#include "Vec3.h"
#include "Ray.h"
#include <iostream>
#include <cmath>


using std::make_shared;
using std::shared_ptr;
using std::sqrt;


// Utility Functions
double degrees_to_radians(double degrees);

// Common Headers

extern const double pi;
extern const double infinity;

double random_double();

double random_double(double min, double max);

void write_color(std::ostream& out, const Color& pixel_color);

bool hit_sphere(const Point3& center, double radius, const Ray& r);

Vec3 randomVec3();

Vec3 randomVec3(double min, double max);

Vec3 unit_vector(const Vec3& v);

Vec3 random_in_unit_sphere();

Vec3 random_unit_vector();

Vec3 random_on_hemisphere(const Vec3& normal);

Vec3 random_in_unit_disk();

int random_int(int min, int max);

Vec3 random_cosine_direction();